#ifndef __________WARD_LOGIC_UNIVERSE_H
#define __________WARD_LOGIC_UNIVERSE_H


#include "LogicPlanet.h"


class logicUniverse
{

public:

	logicUniverse(){}


	void add(logicPlanet p) { galaxy.push_back(p);}

	void turn();

	int getForce(int loc) { return galaxy[loc].getForce().getSize(); }
	int moveForce(int loc, int n) { galaxy[loc].getForce().destroy(n); return n; }
	int getForceRdy(int loc) { galaxy[loc].getForce().getRdy(); }
	int getPop(int loc) { return galaxy[loc].getPop(); }
	string getName(int loc) { return galaxy[loc].getName();}
	logicPlanet& getPlanet(int loc) { return galaxy[loc]; }
	float getPct(int id) { vector<int> ao = allOwned(id); return (float(ao.size())/galaxy.size())*100; }

	int getOwner(int loc) { return galaxy[loc].getOwner(); }
	void setOwner(int loc, int id) { galaxy[loc].setOwner(id); }

	void print(int loc) { cout << loc << endl; galaxy[loc].print(); }
	vector<string> printS(int loc) { return galaxy[loc].infoStrings(); }
	vector<int> allOwned(int id);	
	queue<int> turnQueue(int id);

	void clear() {galaxy.clear();}


private:

	vector <logicPlanet> galaxy;


};


static void cycleQueue(queue<int> &r) { int i = r.front(); r.pop(); r.push(i); }



#endif